﻿<Window x:Class="Probel.Ldoc.Views.ToolBoxes.CreateInstantPatientView"
        
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:t="clr-namespace:Probel.Ldoc.Views.Properties"
        
        Title="{x:Static t:Messages.Title_CreatePatient}" 
        ResizeMode="NoResize" 
        ShowInTaskbar="False" 
        WindowStartupLocation="CenterOwner" 
        WindowStyle="ToolWindow" 
        SizeToContent="Height"
        Width="400"
        Loaded="Window_Loaded">
    <Window.Resources>
        <ResourceDictionary Source="../Themes/Generic.xaml"/>
    </Window.Resources>

    <DockPanel>
        <DockPanel.Resources>
            <Style TargetType="TextBlock" x:Key="labelStyle">
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Setter Property="HorizontalAlignment" Value="Right"/>
                <Setter Property="Margin" Value="5,0,0,0"/>
                <Setter Property="Width" Value="90"/>
                <Setter Property="TextAlignment" Value="Right"/>
            </Style>

        </DockPanel.Resources>
        <TextBlock DockPanel.Dock="Top" Margin="5"
                   Text="{x:Static t:Messages.Lbl_CreatePatientTitle}" 
               FontSize="20" 
                   Foreground="{StaticResource TaskDialogMainInstructionBrush}" HorizontalAlignment="Left"/>
        <Border DockPanel.Dock="Top" Margin="5" BorderBrush="#FFD5DFE5" BorderThickness="1" CornerRadius="3">
            <TextBlock DockPanel.Dock="Top" Margin="5"
                   Text="{x:Static t:Messages.Lbl_CreatePatient}" 
                   TextWrapping="Wrap"
                   HorizontalAlignment="Center"
                   TextAlignment="Center"/>
        </Border>

        <Border Style="{StaticResource ToolBoxBorderStyle}">
            <StackPanel DockPanel.Dock="Bottom"
                        Orientation="Horizontal"
                        HorizontalAlignment="Right">
                <Button Content="{x:Static t:Messages.Btn_Ok}"
                        Style="{DynamicResource ButtonToolBoxStyle}" 
                        Click="Click_Ok"
                        Command="{Binding CreatePatientCommand}"
                        IsDefault="True"/>
                <Button Content="{x:Static t:Messages.Btn_Cancel}"  
                        Style="{DynamicResource ButtonToolBoxStyle}" 
                        Click="Click_Cancel"
                        Command="{Binding CancelCommand}"
                        IsCancel="True"/>
            </StackPanel>
        </Border>

        <CheckBox x:Name="loadOnClose" 
                  DockPanel.Dock="Bottom"
                  HorizontalAlignment="left"
                  IsChecked="True"
                  Content="{x:Static t:Messages.Lbl_LoadPatientAfterCreation}"
                  Margin="5,10,0,0"/>
        <DockPanel DockPanel.Dock="Bottom">
            <TextBlock Text="{x:Static t:Messages.Lbl_LastName}"
                       Style="{StaticResource labelStyle}"/>
            <TextBox DockPanel.Dock="Right"
                     KeyboardNavigation.TabIndex="1"
                     Margin="5"
                     Text="{Binding LastName, UpdateSourceTrigger=PropertyChanged}"/>
        </DockPanel>
        <DockPanel DockPanel.Dock="Bottom">
            <TextBlock Text="{x:Static t:Messages.Lbl_FirstName}"
                       Style="{StaticResource labelStyle}"/>
            <TextBox x:Name="focused"
                     KeyboardNavigation.TabIndex="0"
                     DockPanel.Dock="Right"
                     Margin="5"
                     Text="{Binding FirstName, UpdateSourceTrigger=PropertyChanged}"/>
        </DockPanel>
    </DockPanel>
</Window>
